# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>

pkgname=log4cxx
pkgver=1.1.0
pkgrel=1
pkgdesc="A C++ port of Log4j"
url="http://logging.apache.org/log4cxx"
license=("Apache")
depends=('apr-util' 'libxml2')
arch=('loong64' 'x86_64')
makedepends=('cmake' 'patch' 'zip' 'gzip' 'sed')
conflicts=('log4cxx-svn')
source=("http://archive.apache.org/dist/logging/$pkgname/$pkgver/apache-$pkgname-$pkgver.tar.gz")
sha512sums=('66a66eab933a6afd0779e3f73f65afa4fb82481208b591fd7c7c86ded805f50abcd9cdf954bdb49e1e7f5198e6c1c4fff8a7e180ff5fff9491f1946e9ba6fe2b')

build() {
  cd "$srcdir/apache-$pkgname-$pkgver"
  mkdir -p build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DWITH_AVCODEC=1 -DWITH_FFMPEGTHUMBNAILER=1 ..
  make
}

package() {
  cd "$srcdir/apache-$pkgname-$pkgver/build"
  make DESTDIR="$pkgdir/" install
}
